package io.renren.modules.generator.service;

import com.baomidou.mybatisplus.service.IService;
import io.renren.common.utils.R;
import io.renren.common.vo.ProductExportVo;
import io.renren.modules.generator.entity.AddressProductEntity;
import io.renren.modules.generator.entity.ProductEntity;
import org.apache.poi.ss.usermodel.Workbook;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2018-11-06 15:11:23
 */
public interface ProductService extends IService<ProductEntity> {

    List<ProductEntity> queryPage(Map<String, Object> params);

    int queryPageTotal(Map<String, Object> params);

    ProductEntity queryEntityById(int id);

    void save(ProductEntity product);

    void update(ProductEntity product);

    List<AddressProductEntity> queryProductAddressByProductId(int id);

    List<ProductEntity> queryByCustomerIdAndFromAddressId(Integer customerId, Integer fromAddressId);

    ProductEntity queryByNumber(String productNumber);

    R importFile(Workbook book);

    ProductEntity queryEntityByProductNumberAndCustomerIdAndAddressId(Map<String, Object> params);

    List<ProductExportVo> queryDataForExcel(Map<String, Object> params);

    int queryTotalForExcel(Map<String, Object> params);
}

